CREATE TABLE IF NOT EXISTS DM.DM_ACCOUNT_TURNOVER_F(
    on_date              DATE,
    account_rk           numeric,
    credit_amount        numeric(28, 3),
    credit_amount_rub    numeric(28, 3),
    debet_amount         numeric(28, 3),
    debet_amount_rub     numeric(28, 3)
);

CREATE TABLE IF NOT EXISTS DM.DM_F101_ROUND_F(
    FROM_DATE             DATE,
    TO_DATE               DATE,
    CHAPTER               varchar(1),
    LEDGER_ACCOUNT        varchar(5),
    CHARACTERISTIC        varchar(1),
    BALANCE_IN_RUB        numeric(28, 3),
    R_BALANCE_IN_RUB      numeric(28, 3),
    BALANCE_IN_VAL        numeric(28, 3),
    R_BALANCE_IN_VAL      numeric(28, 3),
    BALANCE_IN_TOTAL      numeric(28, 3),
    R_BALANCE_IN_TOTAL    numeric(28, 3),
    TURN_DEB_RUB          numeric(28, 3),
    R_TURN_DEB_RUB        numeric(28, 3),
    TURN_DEB_VAL          numeric(28, 3),
    R_TURN_DEB_VAL        numeric(28, 3),
    TURN_DEB_TOTAL        numeric(28, 3),
    R_TURN_DEB_TOTAL      numeric(28, 3),
    TURN_CRE_RUB          numeric(28, 3),
    R_TURN_CRE_RUB        numeric(28, 3),
    TURN_CRE_VAL          numeric(28, 3),
    R_TURN_CRE_VAL        numeric(28, 3),
    TURN_CRE_TOTAL        numeric(28, 3),
    R_TURN_CRE_TOTAL      numeric(28, 3),
    BALANCE_OUT_RUB       numeric(28, 3),
    R_BALANCE_OUT_RUB     numeric(28, 3),
    BALANCE_OUT_VAL       numeric(28, 3),
    R_BALANCE_OUT_VAL     numeric(28, 3),
    BALANCE_OUT_TOTAL     numeric(28, 3),
    R_BALANCE_OUT_TOTAL   numeric(28, 3),
    PRIMARY KEY(FROM_DATE, LEDGER_ACCOUNT)
);